package com.cans.lightning.business.pms.dao;

import com.cans.lightning.business.pms.entity.SysRole;
import org.beetl.sql.mapper.BaseMapper;

import java.util.Date;

/**
 * @author shencan
 * @date 2020/6/14 20:33
 */
public interface SysRoleDao extends BaseMapper<SysRole> {
    default void insert(SysRole sysRole) {
        sysRole.setCreateTime(new Date());
        this.getSQLManager().insert(sysRole);
    }

    default int updateById(SysRole sysRole) {
        sysRole.setLastChangeTime(new Date());
        return this.getSQLManager().updateById(sysRole);
    }
}
